#include <stdio.h>
#include <stdlib.h>

#define MULT_TEST(x...)  

#define TRACE(x...) 
#define PRINT(x...) TRACE(printf(x))

int a, b, n, x;
int res;
int test;
int fl;
int gcdAB;
int tmp;

int gcd(int a, int b) {
	if (b==0) return a;
	return gcd(b, a%b);
}

int expon(int b, int e) {
	if (e==0) return 1;

	tmp=expon(b, e/2);
	
	if (e%2==0) {
		return tmp*tmp;	
	}
	else {
		return b*tmp*tmp;	
	}
}

int main() {
	MULT_TEST(
		scanf("%d", &test);

		while (test--) {	
	);

	scanf("%d %d %d", &a, &b, &n);
	PRINT("%d %d %d, ", a, b, n);	

	fl=0;

	if (a==0) {
		if (b==0) printf("1\n");
		else printf("No solution\n");
		MULT_TEST(continue;)
		return 0;
	}
	
	gcdAB = gcd(abs(a), abs(b));

	if (gcdAB!= abs(a)) {
		printf("No solution\n");
		MULT_TEST(continue;)
		return 0;
	}

	res = b/a;

	PRINT("res: %d, ", res);
	
	if (res<0 && n%2==0) {
		printf("No solution\n");
		MULT_TEST(continue;)
		return 0;	
	}

	int acc=1;
	int root;

	for (int i=0; i<=1000; i++) {
		acc = expon(res>0? i :-i, n);
		if (acc==res) {
			root= res>0? i :-i; 
			fl=1; break;
		}

		if (abs(acc)>abs(res)) break;
	}
	
	if (fl)
		printf("%d\n", root);
	else 
		printf("No solution\n");

	MULT_TEST(});

	return 0;
}
